﻿using CommonUnity;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;


namespace GitDiff
{
    public partial class Form2 : Form
    {
        #region 预定义
        private enum TextType
        {
            JsonText = 0,
            XmlText
        }
        #endregion

        public Form2()
        {
            InitializeComponent();
        }

        private void InitControl()
        {
            txtInput.Text = string.Empty;
            txtOutput.Text = string.Empty;
        }

        private void button2_Click(object sender, EventArgs e)
        {
            InitControl();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            TextType eTextType;

            #region 输入校验
            if (string.IsNullOrWhiteSpace(txtInput.Text))
            {
                MessageBox.Show("请输入有效的序列化字符");
                txtInput.Focus();
                return ;
            }
            #endregion

            #region Json判断
            JsonHelper.DeserializeAnonymousType(txtInput.Text)
            #endregion
            #region Xml判断

            #endregion
        }
    }
}
